doctype html
html
  head
    title
      = full_title(yield(:title))

    = csrf_meta_tags

    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload'
    = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
    scss:
      #notice-dlg {
        height: 40px;
        background: #ffffff;
        font-size: 20px;
        font-weight: bold;
        .small{
          font-size: 16px;
          padding-left: 100px;
          color: red;
        }
      }
  body
    header.navbar.navbar-ixed-top.navbar-inverse
      .container
        = link_to "blogs", '/blogs', id: "logo"
        nav
          ul.nav.navbar-nav.navbar-right
            li
              = link_to "Home", home_path
            li
              = link_to "Help",   '/help'
            - if user_signed_in?
              li
                = link_to "Users", '/users'
              li
                = link_to "Blogs", '/blogs'
              li.dropdown
                a.dropdown-toggle href="#" data-toggle="dropdown"
                  |Account
                  b.caret
                ul.dropdown-menu
                  li
                    = link_to "Profile", @current_user
                  li
                    = link_to "Settings", edit_user_path(@current_user)
                  li.divider
                  li
                    = link_to "My followed blogs", my_followed_blogs_path
                  li
                    = link_to "My unfollowed blogs", my_unfollowed_blogs_path
                  li.divider
                  li
                    = link_to "Log out", logout_path, method: :delete
            - else
              li
                = link_to "Log in", login_path

    - if flash[:notice].present?
      #notice-dlg.container.col-md-6.col-md-offset-3[title="温馨提示"]
        .row
          |温馨提示：
        .row.small
          = flash[:notice]
      br
      br
      hr
    .container
      = yield
    footer.footer
      small
        |The blogs by <a href="/">Eric</a>
      nav
        ul
          li
            = link_to "About",   '/about'
          li
            = link_to "Contact", '/contact'
          li
            a href='/blogs'  Blog
    - if user_signed_in?
      p style="margin-top: 20px;"
        |最近登录IP：#{@current_user.recent_login_ip}&nbsp;&nbsp;&nbsp;&nbsp;
        |最近登录时间：#{(@current_user.recent_login_at + 8.hour).strftime('%F %H:%M:%S')}
    = debug(params) if is_dev?
